package com.ubank.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import com.ubank.R;

public class StartActivity extends Activity
{
	private final int	SPLASH_DISPLAY_LENGH	= 4000;

	private ImageView	money;
	private Animation	startAnimation;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.start_animation);

		money = (ImageView) this.findViewById(R.id.money);
		startAnimation = AnimationUtils.loadAnimation(this,
				R.anim.start_animation);
		startAnimation.setFillAfter(true);
		startAnimation.setRepeatMode(Animation.INFINITE);
		money.startAnimation(startAnimation);

		new Handler().postDelayed(new Runnable()
		{

			@Override
			public void run()
			{
				Intent mainIntent = new Intent(StartActivity.this,
						BankMainActivity.class);
				StartActivity.this.startActivity(mainIntent);
				StartActivity.this.finish();
			}

		}, SPLASH_DISPLAY_LENGH);
	}

}
